Skip to content

Instantly share code, notes, and snippets.

@xcsrz
xcsrz / center_text_on_image.py
Created March 8, 2017 00:17
Center text on an image with Python and OpenCV. Had to come up with it myself as no one was spelling this out anywhere (or google couldn't find it)
#!/usr/bin/env python
import numpy as np
import cv2
from time import sleep
# create blank image - y, x
img = np.zeros((600, 1000, 3), np.uint8)
# setup text
@ResistanceIsUseless
ResistanceIsUseless / Header-Injection.yaml
Last active June 15, 2026 20:11
Nuclei SSRF Fuzzing Template
id: header-injection
info:
name: Header SSRF Injection
author: nullrabbit
severity: high
description: Fuzzing headers for OOB SSRF
tags: fuzz,ssrf
requests:
@astamicu
astamicu / Remove videos from Youtube Watch Later playlist.md
Last active June 15, 2026 20:07
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active June 15, 2026 20:06
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@arbaes
arbaes / atomic-arch-check.sh
Last active June 15, 2026 20:01
Atomic Arch vulnerability scan (atomic-lockfile injection checker)
#!/usr/bin/env bash
# Atomic Arch / atomic-lockfile AUR campaign check
# Sources:
# - https://lists.archlinux.org/archives/list/aur-general@lists.archlinux.org/thread/FGXPCB3ZVCJIV7FX323SBAX2JHYB7ZS4/
# - https://www.sonatype.com/blog/atomic-arch-npm-campaign-adds-malicious-dependency
# - https://ioctl.fail/preliminary-analysis-of-aur-malware/
set -uo pipefail
# Malicious npm dep names this campaign rotates through, plus the payload path.
IOC_NAMES='atomic-lockfile|js-digest|lockfile-js|nextfile-js|src/hooks/deps'
@hashangit
hashangit / LM_Studio_compatible_custom_pub_chat_template_gemma4.jinja
Last active June 15, 2026 20:00 — forked from jscott3201/custom_pub_chat_template_gemma4.jinja
A drop-in replacement chat template for google/gemma-4-31B-it tuned for open-source agentic coding harnesses.
{#---------------------------------------------------------------------
LM_Studio_compatible_custom_pub_chat_template_gemma4.jinja
=====================================
A public, harness-friendly fork of Google's Gemma 4 chat template,
tuned for open-source agentic coding harnesses like:
- anomalyco/opencode (https://github.com/anomalyco/opencode)
- earendil-works/pi (https://github.com/earendil-works/pi)
- openclaw, OpenHarness, similar Claude-Code-style harnesses
WHY THIS FORK EXISTS

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@Ravenstine
Ravenstine / apple-screen-sharing-w-sound.md
Last active June 15, 2026 19:56
Apple Screen Sharing w/ Sound

Apple Screen Sharing w/ Sound

macOS comes with a remote desktop application called "Screen Sharing." It is essentially a VNC server and client, and it works really well.

Unfortunately, VNC protocol doesn't include sound, hence neither Screen Sharing for macOS or other VNC clients.

I needed a way to be able to hear various application notifications through Screen Sharing, as well as watch videos or any media hosted by my company. To solve this problem, I came up with a way to support forwarding sound between two Macs.

The idea is to use BlackHole to capture output audio, record it with SoX, and pipe the output to the play command (from SoX) on the remote client. It's not an ideal setup, especially since there's about a second of lag, but it's sufficient if you need to remotely watch videos or hear sound for whatever reason.

@HelgeSverre
HelgeSverre / README.md
Created December 16, 2025 13:10
smart-commit: AI-powered git commits using Claude Code CLI

smart-commit

AI-powered git commits using Claude Code CLI

A zsh function that analyzes your staged and unstaged changes, then creates logical, atomic commits following the Conventional Commits specification.

What It Does

When you run smart-commit, Claude will:

@stecman
stecman / Makefile
Last active June 15, 2026 19:55
DS18B20 1-Wire implementation for Atmel AVR
DEVICE = atmega328p
CLOCK = 16000000
PROGRAMMER = -c arduino -P /dev/ttyUSB0 -b57600
AVRDUDE = avrdude $(PROGRAMMER) -p $(DEVICE)
SOURCES = $(shell find . -name '*.c')
OBJECTS = $(SOURCES:.c=.o)
# Automatic dependency resolution